ImpactMojo ImpactMojo
Premium

EDA for Household Survey Data 101

Univariate Analysis, Distributions & Data Quality for Indian Surveys
ImpactMojo Workshop Series • NFHS, NSS & Census Data Exploration
75-90 Minutes

Workshop 1: Data Understanding & Initial Exploration

Target Audience: Researchers, data analysts, policy professionals, and development practitioners working with large-scale household survey data

Prerequisites: Basic statistics knowledge, familiarity with Excel or R/Python helpful

Materials Needed: Computers with data analysis software, sample datasets (NFHS/NSS extracts), calculators

Learning Objectives

By the end of this workshop, participants will be able to:

Part 1: Understanding Household Survey Data - Structure and Context

20 minutes

The Journey from Village to Dataset: How Survey Data is Born

The Process:

  1. Sampling Design: NFHS-5 surveyed 636,699 households across 707 districts using two-stage stratified sampling
  2. Data Collection: 20+ surveyors spent 13 months collecting data with tablets/phones
  3. Quality Control: GPS verification, audio recordings, supervisory checks
  4. Data Processing: Cleaning, coding, weighting, multiple rounds of validation
  5. Public Release: Anonymized datasets with documentation after 12-18 months

What This Means for Analysis:

  • Every data point represents real households with complex lives
  • Sampling weights are crucial - not all observations are equal
  • Missing data patterns often reflect survey logistics, not random missingness
  • Variable definitions and survey context matter enormously

EDA is about understanding both the data and the process that created it.

Major Indian Household Surveys

NFHS (National Family Health Survey)

  • Focus: Health, nutrition, population
  • Frequency: Every 5-7 years
  • Sample: ~600,000 households
  • Modules: Household, women (15-49), men (15-54), children
  • Special Features: Biomarkers, GPS coordinates, detailed anthropometry
  • Best For: Health outcomes, demographic patterns, maternal/child health

NSS (National Sample Survey)

  • Focus: Consumption, employment, specific topics
  • Frequency: Annual, with major rounds every 5 years
  • Sample: Varies (~100,000-400,000 households)
  • Modules: Household characteristics, consumption expenditure, employment
  • Special Features: Detailed consumption diary, employment schedules
  • Best For: Poverty analysis, consumption patterns, labor force statistics

Data Structure and Variable Types

Household Level

Variables: Location, wealth, housing quality, composition

Key IDs: Cluster, household number, state/district codes

Analysis Unit: Household as unit of observation

Individual Level

Variables: Demographics, education, health, employment

Key IDs: Individual line number, relationship to head

Analysis Unit: Person as unit of observation

Child Level

Variables: Anthropometry, immunization, feeding practices

Key IDs: Mother's line number, birth order

Analysis Unit: Children under 5 years

Birth History

Variables: Birth timing, survival, care seeking

Key IDs: Birth sequence, mother's ID

Analysis Unit: Individual births/pregnancies

Part 2: Data Quality Assessment - First Steps in EDA

25 minutes

The EDA Data Quality Checklist

Always Start With:

  1. Dataset dimensions: How many observations and variables?
  2. Variable types: Categorical, continuous, dates, IDs
  3. Missing data patterns: How much and why?
  4. Value ranges: Any impossible or suspicious values?
  5. Distribution shapes: Normal, skewed, multimodal?
  6. Sampling weights: Are they provided and documented?

Hands-On Exercise: NFHS-5 Data Quality Check (20 minutes)

Dataset: NFHS-5 Women's File Sample (10,000 observations)

Sample Dataset Structure: Variables: 1,247 variables for 10,000 women Key Variables for Exercise: • v001: Cluster number • v002: Household number • v005: Women's individual sample weight • v012: Current age of respondent • v106: Highest educational level • v130: Religion • v190: Wealth index combined • v201: Total children ever born • v447a: Women's BMI • v453: Hemoglobin level (g/dl)
Step 1: Basic Data Overview (5 minutes)
# R code examples - adapt for your software # Load and examine data structure data <- read.csv("nfhs5_women_sample.csv") dim(data) # Dimensions str(data) # Structure summary(data) # Basic summary # Python equivalent import pandas as pd data = pd.read_csv("nfhs5_women_sample.csv") data.shape data.info() data.describe()

Questions to Answer:

  • How many women and variables in the dataset? _____
  • What's the age range of respondents? _____ to _____ years
  • How many variables have missing data? _____
Step 2: Missing Data Analysis (8 minutes)
# Check missing data patterns # R missing_summary <- sapply(data, function(x) sum(is.na(x))) missing_pct <- (missing_summary / nrow(data)) * 100 # Python missing_summary = data.isnull().sum() missing_pct = (missing_summary / len(data)) * 100

Critical Variables to Check:

Variable Expected Range Missing % Quality Issues?
Age (v012) 15-49 years _____% Y/N
Education (v106) 0-3 (coded) _____% Y/N
Children born (v201) 0-20 (realistic) _____% Y/N
BMI (v447a) 12-60 kg/m² _____% Y/N
Hemoglobin (v453) 40-200 g/L _____% Y/N
Step 3: Value Range Checks (7 minutes)

Red Flags to Look For:

  • Impossible values: Negative ages, BMI > 60
  • Suspicious patterns: All values ending in 0 or 5
  • Coding inconsistencies: Mix of 99, 999, -1 for missing
  • Extreme outliers: Values far outside expected range
  • Digit preference: Heaping at round numbers

Analysis Tasks:

  1. Create histograms for age and BMI - any unusual patterns?
  2. Check the distribution of children ever born - realistic?
  3. Examine hemoglobin values - any impossible measurements?
  4. Look at wealth index distribution - balanced across quintiles?

Document Your Findings: What quality issues did you identify and how would you handle them?

Part 3: Univariate Analysis - Understanding Single Variables

25 minutes

Categorical Variables Analysis

Analysis Type Purpose Key Statistics Visualizations
Frequency Distributions Understand category proportions Counts, percentages, mode Bar charts, pie charts
Concentration Measures Assess distribution evenness Herfindahl index, entropy Sorted bar charts
Missing Patterns Understand non-response Missing rates by groups Missing data plots

Continuous Variables Analysis

Survey Data Special Considerations:

  • Sampling weights: Use weighted statistics for population estimates
  • Complex survey design: Standard errors need design adjustment
  • Clustered observations: Households in same area are not independent
  • Measurement precision: Self-reported vs. measured variables differ

Problem Set: Descriptive Statistics with Sampling Weights (15 minutes)

Scenario: Analyzing women's nutritional status using BMI data from NFHS-5

Sample Data for Analysis: • Variable: v447a (BMI in kg/m²) • Sample size: 10,000 women with BMI measurements • Sampling weight: v005 (women's individual weight) • Age groups: 15-19, 20-29, 30-39, 40-49 BMI Categories (WHO Standards): • Underweight: BMI < 18.5 • Normal: 18.5 ≤ BMI < 25 • Overweight: 25 ≤ BMI < 30 • Obese: BMI ≥ 30
Problem 1: Basic Descriptive Statistics (5 minutes)

Calculate both unweighted and weighted statistics:

Statistic Unweighted Weighted Difference
Mean BMI _____ _____ _____
Median BMI _____ _____ _____
Standard Deviation _____ _____ _____
% Underweight _____% _____% _____%

Interpretation: Why might weighted and unweighted estimates differ?

Problem 2: Distribution Analysis (5 minutes)
# R code for distribution analysis # Calculate percentiles quantile(data$v447a, probs = c(0.05, 0.10, 0.25, 0.50, 0.75, 0.90, 0.95), na.rm = T) # Check for outliers (values beyond Q1-1.5*IQR or Q3+1.5*IQR) Q1 <- quantile(data$v447a, 0.25, na.rm = T) Q3 <- quantile(data$v447a, 0.75, na.rm = T) IQR <- Q3 - Q1 outliers <- data$v447a < (Q1 - 1.5*IQR) | data$v447a > (Q3 + 1.5*IQR)

Questions to Answer:

  • What are the 5th and 95th percentiles of BMI? _____ and _____
  • How many women have BMI values flagged as statistical outliers? _____
  • Are these outliers likely to be data errors or genuine extreme values?
  • What percentage of women fall in the "normal" BMI range? _____%
Problem 3: Visualization Interpretation (5 minutes)

Create and interpret these plots:

  1. Histogram of BMI: Describe the shape of the distribution
  2. Box plot by age group: How does BMI vary with age?
  3. Bar chart of BMI categories: Which category is most common?

Key Questions:

  • Is the BMI distribution normal, skewed, or multimodal?
  • Which age group has the highest median BMI?
  • Are there any concerning patterns (e.g., high underweight rates)?

Part 4: Working with Survey Weights and Missing Data

15 minutes

Understanding and Applying Sampling Weights

When to Use Weights:

  • Descriptive statistics: Means, proportions, percentiles
  • Population estimates: Total numbers, prevalence rates
  • Cross-tabulations: Relationships between variables
  • Regression analysis: For population-level inference

When NOT to Use Weights:

  • Sample size reporting: Always report unweighted N
  • Data quality checks: Missing patterns, outliers
  • Model diagnostics: Residual analysis, fit statistics
  • Exploratory analysis: Understanding data structure

Handling Missing Data in Survey Context

Missing Type Example Recommended Approach Caution
Skip Patterns Contraception questions for unmarried women Analyze only relevant subpopulation Clear documentation of eligibility
Item Non-response Income, sensitive topics Multiple imputation or sensitivity analysis Check if missing is systematic
Measurement Issues BMI when height/weight not measured Separate analysis for measured subsample Selection bias assessment
Technical Problems Equipment failure for biomarkers Note limitations, avoid imputation Random vs. systematic failures

Quick Exercise: Weight Impact Assessment (8 minutes)

Compare estimates with and without weights for key indicators:

Indicator Unweighted % Weighted % Difference Implication
Urban residence _____% _____% _____pp Rural over/under-sampled?
Higher education _____% _____% _____pp Education bias in sampling?
Wealth quintile 1 (poorest) _____% _____% _____pp Poor over/under-represented?

Analysis Question: If weighted and unweighted estimates differ substantially (>5 percentage points), what does this tell you about the sampling design and the importance of using weights?

Reflection & Next Steps

10 minutes

EDA Action Planning

Individual Reflection (7 minutes):

Consider your work with survey data:

  1. Which household survey do you use most often? _____
  2. What's the most common data quality issue you encounter? _____
  3. What's one EDA technique you want to improve on? _____
  4. How will you incorporate systematic quality checks into your workflow? _____
  5. What's one insight about sampling weights that was new to you? _____

Quick Share (3 minutes): Exchange experiences about data quality challenges in survey analysis

Key Takeaway

Good EDA is detective work. Always understand your data's structure, quality, and context before jumping into analysis. Survey data carries the complexity of real-world data collection - respect that complexity in your analysis.

Resources for Advanced EDA

Survey Data Sources:

Technical Resources:

Best Practice Guides:

Next Steps in ImpactMojo: